import { createWebHashHistory, createRouter } from 'vue-router'

const _import = (viewName: string) => (): Promise<object> => import(`@view/${viewName}.vue`)

const routes = [
  {
    path: '/',
    name: 'Dashboard',
    component: _import('Dashboard')
  },
  {
    path: '/processData',
    name: 'ProcessData',
    component: _import('ProcessData')
  },
  {
    path: '/memoryCls',
    name: 'MemoryCls',
    component: _import('MemoryCls')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
